home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
RTPC10
/
BASEN_D.PAS
next >
Wrap
Pascal/Delphi Source File
|
1993-11-20
|
3KB
|
63 lines
{
┌────────┬──────────────────────────────────────────────────────┐
│Name │ BASEN_D.PAS │
├────────┼──────────────────────────────────────────────────────┤
│Use │ Example Program for the BASE_N unit. │
├────────┼──────────────────────────────────────────────────────┤
│By │ Rafe Aldridge - (C) Copyright 1993 │
└────────┴──────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────┐
│ Rafe's TP Collection is SHAREWARE │
├───────────────────────────────────────────────────────────────┤
│ │
│ If you find any part of Rafe's TP Collection usefull then │
│ please become a registered user by sending 10 Pounds Sterling │
│ to the address below. In return you will recieve the LATEST │
│ FULL source code to ALL the units as well anything new. │
│ │
│ Please feel free to write with suggestions, ideas or money to │
│ Rafe Aldridge, │
│ Street Farm, │
│ Dereham Road, │
│ Garvestone, │
│ Norfolk. │
│ NR9 4QT │
│ ENGLAND │
│ │
└───────────────────────────────────────────────────────────────┘
}
uses Crt,Basen;
var
Value : Word;
C : Char;
begin
Clrscr;
Writeln;
Writeln ('BASEN.TPU demo by Rafe Aldridge. Copyright 1993 by Rafe Aldridge.');
Repeat
begin
Writeln;
Write ('Enter a value between 0 and 65535: ');
Readln (Value);
Writeln;
Writeln ('With leading zero''s suppressed that number in: ');
Writeln ('hexidecimal (HEX) is '+Hex(4,Value,True));
Writeln ('octal (OCT) is '+Oct(6,Value,True));
Writeln ('binary (BIN) is '+Bin(16,Value,True));
Writeln;
Writeln ('Without leading zero''s suppressed that number in: ');
Writeln ('hexidecimal (HEX) is '+Hex(4,value,False));
Writeln ('octal (OCT) is '+Oct(6,Value,False));
Writeln ('binary (BIN) is '+Bin(16,Value,False));
Writeln;
Write ('Press E to end, any other key to repeat demo.');
C:=Readkey;
Writeln;
end;
Until (c='E') or (c='e');
end.